package com.kun.order.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.math.BigDecimal;


public class OrderDetailedVo {
    /**
     * 详情id
     */
    private Integer id;
    /**
     * 产品名称
     */
    private String pName;
    /**
     * 单位规格
     */
    private String pUnitName;
    /**
     * 订单数量
     */
    @TableField("num")
    private Integer num;
    /**
     * 产品单价
     */
    private BigDecimal pUnitPrice;
    /**
     * 产品总价
     */
    private BigDecimal pTotalPrice;
    /**
     * 订单id
     */
    private Integer parentid;
    /**
     * 分类id
     */
    private Integer cid;
    /**
     * 分类名称
     */
    private String classify;
    /**
     * 产品id
     */
    private Integer sid;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getpName() {
        return pName;
    }

    public void setpName(String pName) {
        this.pName = pName;
    }

    public String getpUnitName() {
        return pUnitName;
    }

    public void setpUnitName(String pUnitName) {
        this.pUnitName = pUnitName;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public BigDecimal getpUnitPrice() {
        return pUnitPrice;
    }

    public void setpUnitPrice(BigDecimal pUnitPrice) {
        this.pUnitPrice = pUnitPrice;
    }

    public BigDecimal getpTotalPrice() {
        BigDecimal itemPrice = this.getpUnitPrice().multiply(new BigDecimal(this.getNum().toString()));
        return itemPrice;
    }

    public void setpTotalPrice(BigDecimal pTotalPrice) {
        this.pTotalPrice = pTotalPrice;
    }

    public Integer getParentid() {
        return parentid;
    }

    public void setParentid(Integer parentid) {
        this.parentid = parentid;
    }

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public String getClassify() {
        return classify;
    }

    public void setClassify(String classify) {
        this.classify = classify;
    }

    public Integer getSid() {
        return sid;
    }

    public void setSid(Integer sid) {
        this.sid = sid;
    }
}
